package com.hoshiibuy.customerOperation.entity.param;

import java.io.Serializable;

import org.apache.commons.lang3.StringUtils;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.hoshiibuy.common.query.CommonParam;
import com.hoshiibuy.customerOperation.entity.ReviewsImages;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 查询平台商品评价-图片及视频参数
 * </p>
 * 
 * @author Mr.Wu
 * @since 2019-04-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "查询平台商品评价-图片及视频", description = "查询平台商品评价-图片及视频")
public class ReviewsImagesQueryParam extends CommonParam implements Serializable {

	private static final long serialVersionUID = 1L;

	private Long id;

	@ApiModelProperty(value = "评价id")
	private Integer reviewId;

	@ApiModelProperty(value = "缩略图")
	private String thumbnail;

	@ApiModelProperty(value = "原图")
	private String image;

	public QueryWrapper<ReviewsImages> getQueryWrapper() {
		QueryWrapper<ReviewsImages> queryWrapper = new QueryWrapper<ReviewsImages>();
		queryWrapper.eq(this.id != null, "id", this.id);
		queryWrapper.eq(this.reviewId != null, "review_id", this.reviewId);
		queryWrapper.eq(StringUtils.isNotBlank(this.thumbnail), "thumbnail", this.thumbnail);
		queryWrapper.eq(StringUtils.isNotBlank(this.image), "image", this.image);
		return queryWrapper;
	}
}
